# Contributor: Rabindra Dhakal <contact@qaidvoid.dev>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprlang
pkgver=0.5.3
pkgrel=0
pkgdesc="The official implementation library for the hypr config language."
url="https://hyprland.org/hyprlang/"
arch="all"
license="LGPL-3.0-only"
makedepends="cmake hyprutils-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hyprwm/hyprlang/archive/v$pkgver.tar.gz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
b5ab72d0f6ddb4c190bb2c2a495fab0128de0b5432b3161785b2ef0111aaea18ca42f17bc77248a4a4ab8b86d7cdd9b3acf415d495d4fcac42cf8bab5bc87df6  hyprlang-0.5.3.tar.gz
"
